set -ex

pip install pybind11
pip install build

# build cpp lib
rm -rf build
mkdir build
cd build
cmake .. && make install
cd ../

# build python package
python -m build --wheel

whl_paths=(dist/*.whl)
pip install ${whl_paths[0]} --force-reinstall

#ref cmd
# nvidia-smi --query-gpu=compute_cap --format=csv

